package com.example.springbootdemo.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.time.LocalDateTime;

/**
 * 测试Job
 * @author hh
 * @date 2022/1/25
 */
@Slf4j
public class Job2 implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        before();
        // TODO
        after();
    }

    private void before(){
        log.info("Job2任务开始执行：{}", LocalDateTime.now());
    }

    private void after(){
        log.info("Job2任务执行结束：{}", LocalDateTime.now());
    }
}
